Skip to main content

Iteam ssh

#!/usr/bin/expect -f
#echo "zhps-test:zhps@688Ecs!."
set user root
set password 1QAZ3edc
set host 39.106.144.26
set port 22
set timeout -1

spawn ssh $user@$host
expect "*password:*"
send "$password\r"
interact
expect eof